package com.bingarchive;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class PublicUtil {
	public static final Date BEGIN_DATE = new Date(2009 - 1900, 5 - 1, 24);
	public static final int IMAGE_FULL_WIDTH = 1366;
	public static final SimpleDateFormat DATEKEY_FORMAT = new SimpleDateFormat("yyyyMMdd");
	public static final long DAY_MILLISECOND = 86400000;
	
	
	public static long GetDay(Date dt) {
		int _ntOffset = TimeZone.getDefault().getRawOffset();
		return dt.getTime() + _ntOffset / DAY_MILLISECOND;
	}

	public static String GetDateKey(Date date) {
		return DATEKEY_FORMAT.format(date);
	}


}
